package com.yangtzeu.jwc.utils;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DbUtils extends SQLiteOpenHelper {


    public DbUtils(Context context) {
        super(context, "yangtzeu.db", null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {//是在数据库每一次被创建的时候调用的(因为本程序比较简单,故没有做加密的工作.)
        db.execSQL("CREATE TABLE student(id integer primary key autoincrement, name varchar(20), password VARCHAR(20))");
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }

}
